package com.qf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.Cinema;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.Cinema;
import org.apache.ibatis.annotations.Mapper;
import org.mybatis.spring.annotation.MapperScan;

/**
 * 作者：Xx凯丶
 * 时间：2022/4/19 15:16
 */
@Mapper
public interface CinemaSearchMapper extends BaseMapper<Cinema> {
    @Select("SELECT show_name FROM cinema c\n" +
            "LEFT JOIN hall h ON c.cinema_id = h.cinema_id\n" +
            "WHERE c.cinema_id=#{cinemaId}")
    public List<String> queryTypeByCinemaId(Integer cinemaId);
    @Select("SELECT MIN(price) FROM cinema c LEFT JOIN scenes s \n" +
            "ON c.cinema_id = s.cinema_id\n" +
            "WHERE c.cinema_id=#{cinemaId}")
    public Integer queryMinPriceByCinemaId(Integer cinemaId);
}
